<?php echo $this->doctype() ?>
<html>
<head>
<title>AUTOEVALUACIÓN - CUN</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script type="text/javascript">
var baseUrl = "<?php echo $this->baseUrl(); ?>";
</script>
  <?php
  $this->headLink()->appendStylesheet($this->baseUrl('bootstrap/css/bootstrap.green.css'));
  $this->headLink()->appendStylesheet($this->baseUrl('css/south-street/jquery-ui-1.10.4.custom.min.css'));
  $this->headLink()->appendStylesheet($this->baseUrl('spinedit/bootstrap-spinedit.css'));
  $this->headLink()->appendStylesheet($this->baseUrl('css/superTabs.css'));
  $this->headLink()->appendStylesheet($this->baseUrl('metis-menu/menu.css'));
  $this->headLink()->appendStylesheet($this->baseUrl('font-awesome/css/font-awesome.min.css'));
  $this->headLink()->appendStylesheet($this->baseUrl('dataTable/css/jquery.dataTables.css'));
  $this->headLink()->appendStylesheet($this->baseUrl('chosen/chosen.min.css'));
  $this->headLink()->appendStylesheet($this->baseUrl('css/dashboard.css'));
  //$this->headLink()->appendStylesheet($this->baseUrl('dataTable/css/dataTables.bootstrap.css'));
  echo $this->headLink();
  
  $this->headScript()->appendFile($this->baseUrl('js/jquery.js'));
  $this->headScript()->appendFile($this->baseUrl('bootstrap/js/bootstrap.min.js'));
  $this->headScript()->appendFile($this->baseUrl('js/jquery-ui-1.10.4.custom.min.js'));
  //$this->headScript()->appendFile($this->baseUrl('js/cookie.js'));
  $this->headScript()->appendFile($this->baseUrl('spinedit/bootstrap-spinedit.js'));
  $this->headScript()->appendFile($this->baseUrl('metis-menu/menu.js'));
  $this->headScript()->appendFile($this->baseUrl('dataTable/js/jquery.dataTables.min.js'));
  $this->headScript()->appendFile($this->baseUrl('dataTable/js/initDataTables.js'));
 // $this->headScript()->appendFile($this->baseUrl('dataTable/js/dataTables.bootstrap.js'));
  $this->headScript()->appendFile($this->baseUrl('js/jquery.popupWindow.js'));
  $this->headScript()->appendFile($this->baseUrl('js/superTabs.js'));
  $this->headScript()->appendFile($this->baseUrl('chosen/chosen.jquery.min.js'));
  $this->headScript()->appendFile($this->baseUrl('js/bootstrap-growl.min.js'));
  $this->headScript()->appendFile($this->baseUrl('js/bootstrap-maxlength.js'));
  $this->headScript()->appendFile($this->baseUrl('js/init.js'));
  echo $this->headScript();
  ?>
  <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
  <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
    <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
  <![endif]-->
</head>
<body>
<?php echo $this->header()?>
<div class="container-fluid">
  <div class="row">
    <!-- Esta es el sidebar -->
    <div class="col-sm-3 col-md-2 sidebar">
    <div class="center-block clearfix" style="padding: 10px;">
      <div class="pull-left">
        <img src="<?php echo $this->baseUrl('img/1402233820_user_48.png')?>" class="img-circle" />
      </div>
      <div style="margin-left: 55px;">
        <span style="color:white;"><strong><?php echo App_User::getNombreUsuario()?></strong></span>
        <br/>
        <span style="color:white;"><?php echo App_User::getNombreRol()?></span>
      </div>
    </div>
    <?php echo $this->menuPrincipal();?>
    
  <!--  <nav class="sidebar-nav">
   <ul id="menu">
	<li class="">
	  <a href="#">
		<span class="sidebar-nav-item-icon fa fa-github fa-lg"></span>
		<span class="sidebar-nav-item">metisMenu</span>
		<span class="fa arrow"></span>
	  </a>
	  <ul class="collapse" style="height: 0px;">
		<li>
		  <a href="https://github.com/onokumus/metisMenu">
			<span class="sidebar-nav-item-icon fa fa-code-fork"></span>
			Fork
		  </a>
		</li>
		<li>
		  <a href="https://github.com/onokumus/metisMenu">
			<span class="sidebar-nav-item-icon fa fa-star"></span>
			Star
		  </a>
		</li>
		<li>
		  <a href="https://github.com/onokumus/metisMenu/issues">
			<span class="sidebar-nav-item-icon fa fa-exclamation-triangle"></span>
			Issues
		  </a>
		</li>
		<li>
		  <a href="https://github.com/onokumus/metisMenu/archive/gh-pages.zip">
			<span class="sidebar-nav-item-icon fa fa-download"></span>
			Download Demo
		  </a>
		</li>
	  </ul>
	</li>
	  <li class="">
		  <a href="#">Menu 0 <span class="fa arrow"></span></a>
		  <ul class="collapse" style="height: 0px;">
			  <li><a href="#">item 0.1</a></li>
			  <li><a href="#">item 0.2</a></li>
			  <li><a href="http://onokumus.com">onokumus</a></li>
			  <li><a href="#">item 0.4</a></li>
		  </ul>
	  </li>
	  <li class="active">
		  <a href="#">Menu 1 <span class="fa arrow"></span></a>
		  <ul class="collapse in" style="height: auto;">
			  <li><a href="#">item 1.1</a></li>
			  <li><a href="#">item 1.2</a></li>
			  <li class="">
				  <a href="#">Menu 1.3</a>
			  </li>
			  <li><a href="#">item 1.4</a></li>
			  <li>
				  <a href="#">Menu 1.5</a>
			  </li>
		  </ul>
	  </li>
  </ul>
 </nav> -->
 <script type="text/javascript">
    $(function () {
        $('#menu').metisMenu();
        if(typeof(Storage) !== "undefined") {
        	$('ul#menu ul li a').click(function() {
            	//alert("Asignando: "+$(this).attr('href'));
            	//$.removeCookie('menu_selected', { path: '/' });
                //$.cookie("menu_selected",$(this).attr('href'), { path: '/' });
               	sessionStorage.menu = $(this).attr('href');
            });
            var menu_seleccionado = $("a[href='"+sessionStorage.menu+"']");
            if(menu_seleccionado.length) {
                //alert($.cookie("menu_selected"));
                //alert(JSON.stringify($.cookie()));
                //alert(menu_seleccionado.closest("ul").html());
                menu_seleccionado.closest("ul").addClass("in");
                menu_seleccionado.closest("ul").css("height","auto");
                menu_seleccionado.parents("li:eq(1)").closest("li").addClass("active");
            	menu_seleccionado.addClass("active");
            }
        }
    });
</script>
    </div>
    
    <!-- Ete es el cuerpo -->
    <div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
      <h1 class="page-header"><?php echo $this->placeholder("titulo"); ?></h1>
      <?php echo $this->placeholder("navegacion"); ?>
      <?php echo $this->layout()->content ?>
      <?php
        $priorityMsg = $this->priorityMessenger();
        if (count( $priorityMsg ) > 0) {
            $types = array("success"=>"success", "warning"=>"warning", "error"=>"danger");
            $icons = array("success"=>"ok-sign", "warning"=>"warning-sign", "error"=>"thumbs-down");
            $titles = array("success"=>"Operación exitosa", "warning"=>"Advertencia", "error"=>"Ha ocurrido un error");
        	echo '<script type="text/javascript">';
        	foreach ( $priorityMsg as $label => $messages ) {
        	    $type = array_key_exists($label, $types) ? $types[$label] : "info";
        	    $icon = array_key_exists($label, $icons) ? $icons[$label] : "info-sign";
        	    $title = array_key_exists($label, $titles) ? $titles[$label] : "Información";
        	    $finalmsg = "";
        		foreach ( $messages as $message ) {
        		    $finalmsg .= "- ".str_replace("\n","<br/>", str_replace("'","\\'", htmlentities($message)))."<br/>";
        		}
                echo "\$.growl({message:' $finalmsg', title:'$title', icon:'glyphicon glyphicon-$icon'},{type:'$type'});";
        	}
        	echo '</script>';
        }
      ?>
    </div>
    <?php //echo $this->footer()?>
  </div>
  <div id="confirmation_delete" title="Eliminar registro">
    ¿Esta seguro que desea eliminar
    <strong><span id="confirmation_delete_msg"></span></strong>?
  </div>

  <div id="confirmation_action" title="Confirmar">
    ¿Esta seguro que desea continuar
    <strong><span id="confirmation_action_msg"></span></strong>?
  </div>
</div>
</body>
</html>